Secret Santa Shuffler

In today's challenge, we were tasked with creating an algorithm to create a Secret Santa gift exchange. The goal was to take an array of people and assign each person to another in a shuffled manner. A key condition was that no one should be assigned to themselves. To replicate the randomness and excitement of drawing names from a hat, I implemented a shuffle function. This function simulates the process of shaking names in a hat, ensuring that each time it's run, a new set of key/value pairs is generated, representing the Secret Santa assignments.

Screenshot of solution